<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>SwiftUI 100天 - A5打印版</title>
    <style>
        /* 重置与基础样式 */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Times New Roman', serif;
            background-color: #f9f9f9;
            color: #333;
            line-height: 1.6;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            padding: 10mm;
        }

        /* A5尺寸设置 - 148mm × 210mm */
        .a5-page {
            width: 148mm;
            height: 210mm;
            background: white;
            box-shadow: 0 1mm 3mm rgba(0, 0, 0, 0.1);
            padding: 15mm;
            position: relative;
            overflow: hidden;
            border: 0.2mm solid #ddd;
        }

        /* 打印样式设置 */
        @media print {
            body {
                background: none;
                padding: 0;
                margin: 0;
            }

            .a5-page {
                width: 148mm;
                height: 210mm;
                box-shadow: none;
                margin: 0;
                padding: 15mm;
                page-break-after: always;
                border: none;
            }

            .no-print {
                display: none;
            }
        }

        /* 内容样式 */
        .header {
            text-align: center;
            margin-bottom: 10mm;
            /* padding-bottom: 5mm; */
            /* border-bottom: 0.3mm solid #ddd; */
        }

        h1 {
            font-size: 10mm;
            color: #000;
            margin-bottom: 3mm;
            font-weight: bold;
            letter-spacing: 0.5mm;
        }

        h2 {
            font-size: 5mm;
            color: #555;
            font-weight: normal;
            margin-bottom: 5mm;
            font-style: italic;
        }

        .content {
            height: 140mm;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }

        .section {
            margin-bottom: 5mm;
        }

        h3 {
            font-size: 5mm;
            color: #444;
            margin-bottom: 2mm;
            padding-bottom: 1mm;
            border-bottom: 0.2mm solid #ddd;
            font-weight: bold;
        }

        p {
            margin-bottom: 2mm;
            font-size: 3.5mm;
            color: #333;
            line-height: 1.5;
        }

        a {
            color: #666;
            text-decoration: none;
            border-bottom: 0.1mm dotted #999;
        }

        a:hover {
            color: #000;
            border-bottom: 0.1mm solid #000;
        }

        ul {
            margin: 2mm 0;
            padding-left: 5mm;
        }

        li {
            margin-bottom: 1.5mm;
            color: #333;
            font-size: 3.5mm;
        }

        .qr-section {
            text-align: center;
            padding: 3mm;
            background-color: #f5f5f5;
            border-radius: 1mm;
            margin: 3mm 0;
            border: 0.2mm dashed #ccc;
        }

        .qr-section p {
            margin-bottom: 2mm;
            font-weight: bold;
            color: #555;
        }

        .copyright {
            text-align: center;
            font-size: 3mm;
            color: #777;
            margin-top: 5mm;
            padding-top: 3mm;
            border-top: 0.2mm solid #ddd;
        }

        .decoration {
            position: absolute;
            z-index: -1;
            opacity: 0.05;
        }

        .circle-1 {
            width: 40mm;
            height: 40mm;
            border-radius: 50%;
            background: #000;
            top: -10mm;
            left: -10mm;
        }

        .circle-2 {
            width: 30mm;
            height: 30mm;
            border-radius: 50%;
            background: #000;
            bottom: 10mm;
            right: -5mm;
        }

        .line-decoration {
            height: 0.1mm;
            background: #ddd;
        }

        .line-1 {
            width: 60mm;
            top: 25mm;
            right: -10mm;
            transform: rotate(45deg);
        }

        .line-2 {
            width: 40mm;
            bottom: 30mm;
            left: -10mm;
            transform: rotate(-30deg);
        }

        /* 打印按钮样式 */
        .print-button {
            position: fixed;
            bottom: 20px;
            right: 20px;
            background: #fff;
            color: #333;
            border: 0.2mm solid #333;
            padding: 8px 16px;
            border-radius: 3mm;
            font-family: inherit;
            font-size: 12px;
            cursor: pointer;
            z-index: 1000;
            box-shadow: 0 1mm 2mm rgba(0, 0, 0, 0.1);
        }

        .print-button:hover {
            background: #f5f5f5;
        }

        .print-guide {
            position: fixed;
            bottom: 70px;
            right: 20px;
            background: white;
            color: #333;
            padding: 8px;
            border-radius: 2mm;
            font-size: 11px;
            max-width: 250px;
            box-shadow: 0 1mm 3mm rgba(0, 0, 0, 0.1);
            border: 0.2mm solid #ddd;
        }

        .url-box {
            background: #f9f9f9;
            padding: 2mm;
            border: 0.2mm solid #eee;
            border-radius: 1mm;
            margin: 1mm 0;
            font-size: 3mm;
            word-break: break-all;
        }
    </style>
</head>

<body>
    <div class="a5-page">
        <!-- 装饰元素 -->
        <div class="decoration circle-1"></div>
        <div class="decoration circle-2"></div>
        <div class="decoration line-decoration line-1"></div>
        <div class="decoration line-decoration line-2"></div>

        <!-- 头部 -->
        <div class="header">
            <h1>SwiftUI 100天</h1>
            <h2>AI翻译中文版</h2>
        </div>

        <!-- 内容 -->
        <div class="content">
            <div class="section">
                <h3>关于本书</h3>
                <p>本书是《100 Days Of SwiftUI》的AI翻译中文版，旨在为中文读者提供学习SwiftUI的便利。若您希望阅读原版英文版，可通过官方网站进行查阅：</p>
                <div class="url-box">
                    <a
                        href="https://www.hackingwithswift.com/100/swiftui">https://www.hackingwithswift.com/100/swiftui</a>
                </div>
            </div>

            <div class="section">
                <h3>版权说明</h3>
                <p>本书的版权归hackingwithswift.com所有，仅供个人学习交流使用。任何组织或个人未经授权，不得将本书用于商业用途，包括但不限于用于盈利性的培训、出版、销售等活动，以尊重和保护原作者的知识产权。
                </p>
            </div>

            <div class="section">
                <h3>配套源码</h3>
                <p>为方便读者学习和实践，本书提供了配套源码，您可以通过以下两个渠道获取：</p>
                <ul>
                    <li><strong>国外渠道（Github）：</strong>
                        <div class="url-box">
                            <a
                                href="https://github.com/twostraws/HackingWithSwift">https://github.com/twostraws/HackingWithSwift</a>
                        </div>
                    </li>
                    <li><strong>国内渠道（Gitee）：</strong>
                        <div class="url-box">
                            <a
                                href="https://gitee.com/mirrors/HackingWithSwift">https://gitee.com/mirrors/HackingWithSwift</a>
                        </div>
                    </li>
                </ul>
            </div>
        </div>
    </div>

    <!-- 打印按钮和指南 -->
    <!-- <button class="print-button no-print" onclick="window.print()">打印/导出PDF</button> -->
</body>

</html>